﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class RightInfo : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            bindtodatalist();
        }
    }
    public void bindtodatalist()
    {
        DataSet ds = new get().getvipinfo();
        DataList1.DataSource = ds.Tables["vip"];
        DataList1.DataKeyField = "cpid";
        DataList1.DataBind();
    }
    protected void ImageButton1_Click1(object sender, ImageClickEventArgs e)
    {
        string hy = ddlhy.SelectedValue.Trim();
        string zp = ddlzp.SelectedValue.Trim();
        string ma = txtpoint.Text.Trim();
        if (zp == "1")
        {
            Response.Redirect("Stujob.aspx?hy=" + hy + "&zp=" + zp + "&ma=" + ma);
        }
        if (zp == "3")
        {
            Response.Redirect("Prajob.aspx?hy=" + hy + "&zp=" + zp + "&ma=" + ma);
        }
    }
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover", "if(this!=oldrow){currentcolor=this.style.backgroundColor;this.style.backgroundColor='PeachPuff',this.style.fontWeight='';}");

            e.Row.Attributes.Add("onmouseout", "if(this!=oldrow){this.style.backgroundColor=currentcolor;this.style.fontWeight='';}");

            // e.Row.Attributes.Add("onclick", e.Row.ClientID.ToString() + ".checked=true;selectx(this)");
        }
    }
    protected void GridView3_RowDataBound(object sender, GridViewRowEventArgs e)
    {

        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover", "if(this!=oldrow){currentcolor=this.style.backgroundColor;this.style.backgroundColor='PeachPuff',this.style.fontWeight='';}");

            e.Row.Attributes.Add("onmouseout", "if(this!=oldrow){this.style.backgroundColor=currentcolor;this.style.fontWeight='';}");

            // e.Row.Attributes.Add("onclick", e.Row.ClientID.ToString() + ".checked=true;selectx(this)");
        }
    }
    
}
